home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 278_01 / cxldef.h < prev    next >
Text File  |  1990-02-13  |  4KB  |  116 lines

  1. /*
  2.    ┌──────────────────────────────────────────────────────────────────────────┐
  3.    │                                                                          │
  4.    │  CXLDEF.H  -  CXL is Copyright (c) 1987-1989 by Mike Smedley.            │
  5.    │                                                                          │
  6.    │  This header file contains miscellaneous function prototypes and         │
  7.    │  definitions.                                                            │
  8.    │                                                                          │
  9.    └──────────────────────────────────────────────────────────────────────────┘
  10. */
  11.  
  12. #if defined(__TURBOC__)                     /* Turbo C */
  13.     #if __STDC__
  14.         #define _Cdecl
  15.     #else
  16.         #define _Cdecl  cdecl
  17.     #endif
  18.     #define _Near
  19. #elif defined(__ZTC__)                      /* Zortech C++ */
  20.     #define _Cdecl
  21.     #define _Near
  22. #elif defined(M_I86) && !defined(__ZTC__)   /* Microsoft C/QuickC */
  23.     #if !defined(NO_EXT_KEYS)
  24.         #define _Cdecl  cdecl
  25.         #define _Near   near
  26.     #else
  27.         #define _Cdecl
  28.         #define _Near
  29.     #endif
  30. #endif
  31.  
  32. /*---------------------------[ function prototypes ]-------------------------*/
  33.  
  34. char           *_Cdecl biosver(void);
  35. int             _Cdecl clockcal(void);
  36. char           *_Cdecl cxlver(void);
  37. void            _Cdecl delay_(unsigned duration);
  38. unsigned        _Cdecl expmem(void);
  39. unsigned        _Cdecl extmem(void);
  40. int             _Cdecl fcrypt(char *file,char *key);
  41. int             _Cdecl gameport(void);
  42. int             _Cdecl machid(void);
  43. int             _Cdecl mathchip(void);
  44. int             _Cdecl numflop(void);
  45. int             _Cdecl numpar(void);
  46. int             _Cdecl numser(void);
  47. char           *_Cdecl randfile(void);
  48. void            _Cdecl sound_(unsigned pitch,unsigned duration);
  49. void            _Cdecl _stdoutch(int ch);
  50. char           *_Cdecl sysdate(int dtype);
  51. char           *_Cdecl systime(int ttype);
  52. int             _Cdecl tabstop(int col,int tabwidth);
  53. unsigned long   _Cdecl timer(void);
  54.  
  55. /*-----------------[ definitions for common control codes ]------------------*/
  56.  
  57. #define NUL  0
  58. #define BEL  7
  59. #define BS   8
  60. #define HT   9
  61. #define LF   10
  62. #define FF   12
  63. #define CR   13
  64. #define ESC  27
  65.  
  66. /*------------------------[ definition of NULL ]-----------------------------*/
  67.  
  68. #if !defined(NULL)
  69.     #if defined(__TURBOC__)                     /* Turbo C */
  70.         #if defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__)
  71.             #define NULL    0
  72.         #else
  73.             #define NULL    0L
  74.         #endif
  75.     #elif defined(__ZTC__)                      /* Zortech C++ */
  76.         #ifdef LPTR
  77.             #define NULL    0L
  78.         #else
  79.             #define NULL    0
  80.         #endif
  81.     #elif defined(M_I86) && !defined(__ZTC__)   /* Microsoft C/QuickC */
  82.         #if defined(M_I86SM) || defined(M_I86MM)
  83.             #define NULL    0
  84.         #else
  85.             #define NULL    0L
  86.         #endif
  87.     #endif
  88. #endif
  89.  
  90. /*-----------------------[ Boolean logic conditions ]------------------------*/
  91.  
  92. #define NO      0
  93. #define YES     1
  94. #define FALSE   0
  95. #define TRUE    1
  96. #define OFF     0
  97. #define ON      1
  98.  
  99. /*----------------[ machine ID codes returned from machid() ]----------------*/
  100.  
  101. #define IBMPC       255     /* IBM PC             */
  102. #define IBMPCXT     254     /* IBM PC/XT          */
  103. #define IBMPCJR     253     /* IBM PCjr           */
  104. #define IBMPCAT     252     /* IBM PC/AT          */
  105. #define IBMPCXT2    251     /* IBM PC/XT          */
  106. #define IBMCONV     249     /* IBM PC Convertible */
  107. #define SPERRYPC    48      /* Sperry PC          */
  108.  
  109. /*-----------------------[ macro-function definitions ]-----------------------*/
  110.  
  111. #if !defined(MK_FP)
  112. #define MK_FP(seg,ofs)  ((void far *) (((unsigned long)(seg) << 16) | \
  113.                         (unsigned)(ofs)))
  114. #endif
  115. #define beep() _stdoutch(BEL)
  116.